<input type="text" id="textbox" value="defaultValue" /><br />
<button id="open1">Open ModalDialog</button>
<script>
    var updatetext = "";
    function update() {
        document.getElementById("textbox").value = updatetext;
    }
    
    document.getElementById("open1").onclick = function () {
        window.showModalDialog("inner.html", window);
    }
</script>